POV-Ray : Newsgroups : povray.unix : [beta] source distribution of POV-Ray 3.6 for UNIX : Re: [beta] source distribution of POV-Ray 3.6 for UNIX Server Time
8 Jul 2024 16:49:18 EDT (-0400)
  Re: [beta] source distribution of POV-Ray 3.6 for UNIX  
From: Wolfgang Wieser
Date: 3 Jul 2004 16:12:42
Message: <40e71339@news.povray.org>
Thorsten Froehlich wrote:

> In article <40e6ae1c@news.povray.org> , Wolfgang Wieser <wwi### [at] gmxde>
> wrote:
> 
>> This is probably a bad idea. It looks like __STDC_VERSION__ is
>> significantly larger than 128. Some UNIX systems use only 1 byte to store
>> the exit code of a program and hence, this will fail on these systems.
> 
> Then those systems are not compatible even with ANSI C. -- Too bad, we do
> not support such outdated systems!
> 
Maybe you could even tell us where you found this information. 

I just looked up "ANSI C Rationale 4.11", 
Section "4.10.4.5 The system function" which states:

-------------------
The system function allows a program to suspend its execution temporarily in
order to run another program to completion.  

Information may be passed to the called program in three ways: through
command-line argument strings, through the environment, and (most portably)
through data files.  Before calling the system function, the calling
program should close all such data files.  

Information may be returned from the called program in two ways: through the
implementation-defined return value (in many implementations, the
termination status code which is the argument to the exit function is
returned by the implementation to the caller as the value returned by the
system function), and (most portably) through data files.  
-----------------

It mentiones an "implementation-defined return value". 

So, I see no violation of the ANSI C standard when looking at the 
current system() implementations in several UNIX(like) OS. 

Wolfgang


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.